﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Aleator.Core
{
    /// <summary>
    /// Abstraction of the phrase factory
    /// </summary>
    abstract public class PhraseFactory
    {
        #region Enums

        #pragma warning disable 1591

        /// <summary>
        /// Type of phrase to be created
        /// </summary>
        public enum PhraseType
        {
            Default,
            Drum,
            Bass,
            Rhythm,
            Melody,
            Arp,
            Utility
        }

        #pragma warning restore 1591

        #endregion

        /// <summary>
        /// Create default phrase
        /// </summary>
        /// <returns></returns>
        public abstract Phrase GetPhrase();

        /// <summary>
        /// Create the given type of phrase
        /// </summary>
        /// <param name="phrasetype"></param>
        /// <param name="progression"></param>
        /// <param name="phrase"></param>
        /// <returns></returns>
        public abstract Phrase GetPhrase(PhraseType phrasetype, ConcreteProgression progression, Phrase phrase = null);
        
        /// <summary>
        /// Create a slightly altered version based on the phrase passed
        /// </summary>
        /// <param name="phrasetype"></param>
        /// <param name="progression"></param>
        /// <param name="phrase"></param>
        /// <returns></returns>
        public abstract Phrase ExplodePhrase(PhraseType phrasetype, ConcreteProgression progression);
    }
}
